using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace WindowsFormsApplication1
{
    public partial class rptPhieudiemL1 : DevExpress.XtraReports.UI.XtraReport
    {
        int STT = 0;
        public rptPhieudiemL1()
        {
            InitializeComponent();
        }
        
        public void BindData(int i, string tengv)
        {
            colGV.Text = tengv;
            colTenmonhoc.DataBindings.Add("Text", DataSource, "TenMonhoc");
            colSotrinh.DataBindings.Add("Text", DataSource, "Sotrinh");
            colMalop.DataBindings.Add("Text", DataSource, "MalopID");
            colHocky.DataBindings.Add("Text", DataSource, "Hocky");
            colLanthi.Text = i.ToString() ;
            colMaSV.DataBindings.Add("Text", DataSource, "MasvID");
            colHolot.DataBindings.Add("Text", DataSource, "Holot");
            colTen.DataBindings.Add("Text", DataSource, "Ten");
            colNgaysinh.DataBindings.Add("Text", DataSource, "Ngaysinh", "{0:MM/dd/yyyy}");
            if (i == 1)
                colDiem.DataBindings.Add("Text", DataSource, "DiemL1");
            else if (i == 2)
                colDiem.DataBindings.Add("Text", DataSource, "DiemL2");
            else
                colDiem.DataBindings.Add("Text", DataSource, "DiemL3");
            
        }

   

        private void colSTT_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            STT++;
            colSTT.Text = STT.ToString();
        }

        private void colDiem_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
           
        }

    }
}
